SourceDocument

@Serializable
data class SourceDocument(val sourceId: String, val mediaType: String, val title: String, val filename: String? = null, val providerMetadata: Map<String, JsonElement>? = null) : UIMessagePart

Document-shaped source — a referenced file the model used as grounding (PDF, image, etc.). Per v6's SourceDocumentUIPart. Distinct from File which carries the file's payload — this variant is a CITATION POINTER to a document the model read, not a file the model produced.

Constructors

Link copied to clipboard
constructor(sourceId: String, mediaType: String, title: String, filename: String? = null, providerMetadata: Map<String, JsonElement>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val providerMetadata: Map<String, JsonElement>?
Link copied to clipboard
Link copied to clipboard